schemaVersion: 2.2.0
metadata:
  name: dotnet
components:
  - name: tools
    container:
      image: quay.io/vsvydenk/dotnet:7.0
      memoryLimit: 6Gi
      mountSources: true
      args: ['tail', '-f', '/dev/null']
      endpoints:
        - name: 'hello-endpoint'
          targetPort: 5032
        - name: 'debug-endpoint'
          targetPort: 5000
      volumeMounts:
        - name: nuget
          path: /home/user/.nuget
  - name: nuget
    volume:
      size: 1G
commands:
  - id: 1-update-dependencies
    exec:
      label: Update dependencies
      component: tools
      workingDir: ${PROJECTS_ROOT}/dotnet-web-simple
      commandLine: "dotnet restore"
      group:
        kind: build
  - id: 2-build
    exec:
      label: Build
      component: tools
      workingDir: ${PROJECTS_ROOT}/dotnet-web-simple
      commandLine: "dotnet build"
      group:
        kind: build
  - id: 3-run
    exec:
      label: Run
      component: tools
      workingDir: ${PROJECTS_ROOT}/dotnet-web-simple
      commandLine: "dotnet run"
      group:
        kind: run
